/**
 * Created by Freeman on 2016/7/5.
 */
"use strict";

import {GET_ARTICLE_DETAIL_SUCCESS,TOGGLE_LIKE} from '../types'

const state = {
    item:{}
}

const mutations = {
    [GET_ARTICLE_DETAIL_SUCCESS](state,action){
        state.item = {...state.item,...action.articleDetail}
    },
    [TOGGLE_LIKE](state,action){
        state.item = {...state.item,isLike:action.isLike, like_count: action.like_count}
    }
}

export default {
    state,
    mutations
}